package org.si.utils 
{
	import daphne.noterun.utilities.Room;
	/**
	 * ...
	 * @author Daphne
	 */
	public class FrameRateCounter 
	{
		var startTime:Number; //Use to calculate relative time
		var framesNumber:Number = 0; //Current number of fps
		var room:Room;
		
		public function FrameRateCounter(room:Room) 
		{
			this.room = room;
			
			 startTime = this.(); //Gets the time in milliseconds since the movie started
		}
		
	function update(e:Event):void
	{
		var currentTime:Number = (getTimer() - startTime) / 1000;
	 
		framesNumber++;
		 
		if (currentTime > 1)
		{
			fps.text = "FPS: " + (Math.floor((framesNumber/currentTime)*10.0)/10.0);
			startTime = getTimer();
			framesNumber = 0;
		}
	}
	}

}